<%--
  Created by IntelliJ IDEA.
  User: Tolean
  Date: 2018/5/17
  Time: 19:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML>

<html>
<head>
    <title>LYON</title>
    <%@include file="common/head.jspf"%>
    <link rel="Shortcut Icon" href="${lyon}/static/images/favicon.ico"  />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <!--[if lte IE 8]><script src="${lyon}/static/assets/js/ie/html5shiv.js"></script><![endif]-->
    <link rel="stylesheet" href="${lyon}/static/assets/css/main.css" />
    <!--[if lte IE 9]><link rel="stylesheet" href="${lyon}/static/assets/css/ie9.css" /><![endif]-->
    <!--[if lte IE 8]><link rel="stylesheet" href="${lyon}/static/assets/css/ie8.css" /><![endif]-->

    <link href="${lyon}/static/baiduUE/third-party/SyntaxHighlighter/shCoreDefault.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="${lyon}/static/baiduUE/third-party/SyntaxHighlighter/shCore.js"></script>

    <script type="text/javascript">

        SyntaxHighlighter.all();

    </script>
    <%--<script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/static/baiduUE/ueditor.config.js"></script>--%>
    <%--<script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/static/baiduUE/ueditor.all.min.js"></script>--%>
    <%--<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->--%>
    <%--<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->--%>
    <%--<script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/static/baiduUE/lang/zh-cn/zh-cn.js"></script>--%>
</head>
<body>
<div id="wrapper">
    <!-- Header -->
    <%@include file="common/header.jsp"%>
    <!-- Main -->
    <!-- Main -->
    <div id="main">
        <article class="post">
            <header>
                <div class="title">
                    <h2><a href="#">${blog_single.title}</a></h2>
                    <p>${blog_single.sign}</p>
                </div>
                <div class="meta">
                    <time class="published" datetime="YYYY-MM-DD"><fmt:formatDate value="${blog_single.releas_date}" type="date" dateStyle="full"/></time>
                    <a href="#" class="author"><span class="name">Lyon</span><img src="${lyon}/static/images/avatar.jpg" alt="" /></a>
                </div>
            </header>
            <span class="image featured"><img src="${lyon}/static/images/blog/${blog_single.id % 26}.jpg" alt="" /></span>
            <%--<p> Phasellus sed ultricies mi non congue ullam corper.</p>--%>
            <div class="description" id="description" STYLE="overflow: auto">
                ${blog_single.content}
            </div>
            <footer>
                <ul class="actions">
                    <c:choose>
                        <c:when test="${hasPre}">
                            <li><a href="${lyon}/onstage/single.html?id=${preId}&type_id=${type_id}" class="button big previous">上一篇</a></li>
                        </c:when>
                        <c:otherwise>
                            <li><a href="#" class="disabled button big previous">上一篇</a></li>
                        </c:otherwise>
                    </c:choose>
                    <c:choose>
                        <c:when test="${hasNext}">
                            <li><a href="${lyon}/onstage/single.html?id=${nextId}&type_id=${type_id}" class="button big next">下一篇</a></li>
                        </c:when>
                        <c:otherwise>
                            <li><a href="#" class="disabled button big next">下一篇</a></li>
                        </c:otherwise>
                    </c:choose>
                </ul>
                <ul class="stats">
                    <li><a id="likenum" onclick="like(${blog_single.id})" class="icon fa-heart">${blog_single.likenum}</a></li>
                    <li><a href="#" class="icon fa-comment">${blog_single.commentsnum}</a></li>
                </ul>
            </footer>
        </article>
    </div>
</div>
<script>
    uParse('.description', {
        rootPath: '${pageContext.request.contextPath}/static/baiduUE'
    });
</script>
<script>
    function like(id) {
        $.get("${lyon}/onstage/blog/like.do",{id:id},function (res) {
            if(res.success){
                var likenum=document.getElementById("likenum").innerText;
                document.getElementById("likenum").innerText=(parseInt(likenum)+1).toString();
            }
        },"json");
    }
</script>
<!-- Scripts -->
<script src="${lyon}/static/assets/js/jquery.min.js"></script>
<script src="${lyon}/static/assets/js/jquery.dropotron.min.js"></script>
<script src="${lyon}/static/assets/js/jquery.scrollgress.min.js"></script>
<script src="${lyon}/static/assets/js/skel.min.js"></script>
<script src="${lyon}/static/assets/js/util.js"></script>
<!--[if lte IE 8]><script src="${lyon}/static/assets/js/ie/respond.min.js"></script><![endif]-->
<script src="${lyon}/static/assets/js/main.js"></script>

</body>
</html>
